Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linting the template check #287

Merged
merged 11 commits into from
Jan 30, 2024
Merged

Fix linting the template check #287

merged 11 commits into from
Jan 30, 2024

Conversation

paddyroddy
Copy link
Member

Noticed during my test of issue templates #273, that this was actually not working!

This should fail, due to dodgy linting.

@paddyroddy paddyroddy added the bug Something isn't working label Jan 24, 2024
@paddyroddy paddyroddy self-assigned this Jan 24, 2024
@paddyroddy
Copy link
Member Author

Yay it failed!

{%- endif -%}
{%- endif %}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks to @dpshelio for helping me on this one!

Comment on lines +8 to +9
exclude: |-
(?x)(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed to this syntax in the case that we need to ignore more than one thing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. Why are we excluding this all of a sudden? And why all over the shop?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look, it's the exact same excludes that we had before. It's just the format which has changed.

Unfortunately, @pre-commit isn't using an array for exclude, so you have to rely on this ugly expression https://pre-commit.com/#regular-expressions

@paddyroddy paddyroddy marked this pull request as ready for review January 24, 2024 16:23
Copy link
Member

@samcunliffe samcunliffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing something...

run: pre-commit run --all-files --color always --verbose
working-directory: cookie-template
run: |-
git add .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐛-fix here ☝️ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That and the working-directory. We were never actually linting the template before.

Comment on lines +8 to +9
exclude: |-
(?x)(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get it. Why are we excluding this all of a sudden? And why all over the shop?

@paddyroddy
Copy link
Member Author

Merged in main, which I knew would break it. It was in fixing #286 that I realised linting wasn't working. Fixing now.

@paddyroddy
Copy link
Member Author

Fixed now

paddyroddy and others added 2 commits January 30, 2024 14:06
Co-authored-by: David Stansby <dstansby@gmail.com>
@paddyroddy paddyroddy requested a review from dstansby January 30, 2024 14:08
@paddyroddy
Copy link
Member Author

Someone reviewed it 🤯 thanks @stefpiatek!

@paddyroddy paddyroddy merged commit 8265291 into main Jan 30, 2024
15 checks passed
@paddyroddy paddyroddy deleted the fix-linting-template branch January 30, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants